package com.etc.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.etc.bean.User;
import com.etc.dao.UserDAO;
import com.etc.service.UserService;

@Service
public class UserServiceImpl implements UserService {
	private UserDAO dao;

	@Resource
	public void setDao(UserDAO dao) {
		this.dao = dao;
	}

	public void Regist(User user) {
		dao.save(user);
	}

	public User Login(User user) {
		return dao.getUser(user);
	}

	public List<User> getAllUser() {
		// TODO Auto-generated method stub
		List<User> list=dao.getScrollData(-1, -1);
		return list;
	}
	

}
